package common

import (
	"os"

	"github.com/rs/zerolog"
)

var Logger zerolog.Logger

func InitLogger(serviceName string) {
	zerolog.TimeFieldFormat = zerolog.TimeFormatUnix
	Logger = zerolog.New(os.Stdout).With().
		Timestamp().
		Str("service", serviceName).
		Logger()
	zerolog.DefaultContextLogger = &Logger
}
